package com.ruoyi.slope.ai.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.ai.mapper.SlopeAiModelLibraryMapper;
import com.ruoyi.slope.ai.domain.SlopeAiModelLibrary;
import com.ruoyi.slope.ai.service.ISlopeAiModelLibraryService;

/**
 * AI模型/算法库Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-05
 */
@Service
public class SlopeAiModelLibraryServiceImpl implements ISlopeAiModelLibraryService 
{
    @Autowired
    private SlopeAiModelLibraryMapper slopeAiModelLibraryMapper;

    /**
     * 查询AI模型/算法库
     * 
     * @param modelId AI模型/算法库主键
     * @return AI模型/算法库
     */
    @Override
    public SlopeAiModelLibrary selectSlopeAiModelLibraryByModelId(String modelId)
    {
        return slopeAiModelLibraryMapper.selectSlopeAiModelLibraryByModelId(modelId);
    }

    /**
     * 查询AI模型/算法库列表
     * 
     * @param slopeAiModelLibrary AI模型/算法库
     * @return AI模型/算法库
     */
    @Override
    public List<SlopeAiModelLibrary> selectSlopeAiModelLibraryList(SlopeAiModelLibrary slopeAiModelLibrary)
    {
        return slopeAiModelLibraryMapper.selectSlopeAiModelLibraryList(slopeAiModelLibrary);
    }

    /**
     * 新增AI模型/算法库
     * 
     * @param slopeAiModelLibrary AI模型/算法库
     * @return 结果
     */
    @Override
    public int insertSlopeAiModelLibrary(SlopeAiModelLibrary slopeAiModelLibrary)
    {
        return slopeAiModelLibraryMapper.insertSlopeAiModelLibrary(slopeAiModelLibrary);
    }

    /**
     * 修改AI模型/算法库
     * 
     * @param slopeAiModelLibrary AI模型/算法库
     * @return 结果
     */
    @Override
    public int updateSlopeAiModelLibrary(SlopeAiModelLibrary slopeAiModelLibrary)
    {
        return slopeAiModelLibraryMapper.updateSlopeAiModelLibrary(slopeAiModelLibrary);
    }

    /**
     * 批量删除AI模型/算法库
     * 
     * @param modelIds 需要删除的AI模型/算法库主键
     * @return 结果
     */
    @Override
    public int deleteSlopeAiModelLibraryByModelIds(String[] modelIds)
    {
        return slopeAiModelLibraryMapper.deleteSlopeAiModelLibraryByModelIds(modelIds);
    }

    /**
     * 删除AI模型/算法库信息
     * 
     * @param modelId AI模型/算法库主键
     * @return 结果
     */
    @Override
    public int deleteSlopeAiModelLibraryByModelId(String modelId)
    {
        return slopeAiModelLibraryMapper.deleteSlopeAiModelLibraryByModelId(modelId);
    }
}
